package com.wq.service.spi.simple;

import java.util.ServiceLoader;

/**
 * @Author: wangqiang20995
 * @Date:2019/1/9
 * @Description:
 * @Resource:
 */
public class SpiMain {

    public static void main(String args[]){
        ServiceLoader<CommonService> serviceLoader = ServiceLoader.load(CommonService.class);

        for (CommonService hello: serviceLoader) {
            hello.display("hello");
        }
    }
}
